/* 
 * File:   queue.h
 * Author: jorisgirardot
 *
 * Created on 20 décembre 2012, 22:44
 */

#ifndef QUEUE_H
#define	QUEUE_H

#include <stdlib.h>
#include <stdio.h>
#include "binarytree.h"

typedef struct ElementListe{
    BinaryTree *data;
    struct ElementListe *next;
} Element;

typedef struct ListeRepere{
    Element *first;
    Element *last;
    int size;
} Queue;

/* initialisation */
void init (Queue * suite);

/* ENFILER*/
int enqueue (Queue * suite, Element * courant, BinaryTree *donnee);

/* DE_FILER*/
BinaryTree* dequeue (Queue * suite);

/* FirstInFirstOut */
#define file_donnee(suite) suite->debut->donnee


#endif	/* QUEUE_H */

